#ifndef __DEBUG_H
#define __DEBUG_H


//#define __DEBUG

#ifdef __DEBUG

    #define __DBG(fmt, args...)     printf("DBG:%s():" fmt, __FUNCTION__, ## args)
    #define printfB8                printf_buff_byte
    #define printfB32               printf_buff_word    

    #define __ERR(fmt, args...)                     printf("ERR:" fmt, ## args)
    #define __MSG(fmt, args...)                     printf(fmt, ##args)

    #define DEBUG_PRINTF                            printf
    #define DEBUG_PRINTF_STATUS(curr, cnt, next)    printf("%s:%d(%d)->%d;\r\n", __FUNCTION__, curr, cnt, next)
    #define STACK_PRINTF                            printf
    #define PRINTF                                  printf
    #define WEB_PRINTF                              printf
    #define PING_PRINTF                             printf
    #define MEASURE_PRINTF(fmt, args...)            printf("%s():"fmt,__FUNCTION__, ## args)    


#else

    #define __DBG(fmt, args...)
    #define printfB8(buff, byte_len) 
    #define __ERR(fmt, args...)                     
    #define __MSG(fmt, args...)                     

    #define DEBUG_PRINTF                            
    #define DEBUG_PRINTF_STATUS(curr, cnt, next)
    #define STACK_PRINTF                            
    #define PRINTF                                  
    #define WEB_PRINTF                              
    #define PING_PRINTF                             
    #define MEASURE_PRINTF(fmt, args...)            
    #define printfB32(buff, word_len)    
    
#endif


    
#endif
